<template>
  <component
    :is="componentName"
    :examPaperId="examPaperId"
    @change="changeComponent"
  />
</template>

<script>
import examPaperList from "./list";
import examPaperDetail from "./detail";
export default {
  name: "examPaper",
  components: {
    examPaperList,
    examPaperDetail,
  },
  data() {
    return {
      componentName: "examPaperList",
      examPaperId: "",
    };
  },
  methods: {
    changeComponent({ componentName, id }) {
      this.componentName = componentName;
      this.examPaperId = id;
    },
  },
};
</script>

<style lang="scss" scoped></style>
